package com.itheima.myreflect2.Student.convertedio;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @program: Myset
 * @description:
 * @author: xuejingjing
 * @create: 2021-06-16 10:06
 **/
public class ConverrtedDemo2 {
    public static void main(String[] args) throws IOException {
        User user = new User("zhangsan","12");
        //需求：把这个用户信息保存到本地文件去。
        BufferedWriter bw = new BufferedWriter(new FileWriter("c.txt"));
        bw.write(user.getUserName());
        bw.newLine();
        bw.write(user.getPassword());
        bw.newLine();
        bw.close();
    }
}
